<template>
  <div class="classify">
    <dv-border-box-10 class="header" v-for="item in dataArr" :key="item.index">
      {{ item.attributes.name }}{{ item.attributes.quantity }}
    </dv-border-box-10>
  </div>
</template>

<script>
import AV from "leancloud-storage";

export default {
  data() {
    return {
      dataArr: [],
    };
  },
  created() {
    const query = new AV.Query("tap");
    query.find().then((res) => {
      //查询数据的回调，res是查询出来的数据
      console.log(res);
      this.dataArr = res;
    });
  },
};
</script>
<style lang="less" scoped>
.header {
  width: 200px;
  height: 50px;
  color: white;
  line-height: 50px;
  text-align: center;
}
.classify {
  // width: 100%;
  height: 48px;
  display: flex;
  justify-content: space-around;
}
</style>
